package com.xiaoma.lock;

import java.util.concurrent.locks.ReentrantLock;

/**
 * @author xiaomacdut
 * @date 2020年2月7日 上午9:58:12
 */
public class ReentrantLockTest{
    
    private static ReentrantLock lock = new ReentrantLock();
    private static void print(){
        System.out.println("print........");
    }
    
    private static void add(){
        System.out.println("add........");
        Thread thread = new Thread(){
            
            public void run(){
                System.out.println("asdfasdfa");
            }
        };
    }
    
    public static void main(String [] args){
        lock.lock();
        print();
        lock.unlock();
        
    }
}
